///*
// * Copyright (c) 2019. The copyright is reserved by Ghode of Harbin Institute
// * of Technology. Users are free to copy, change or remove. Because no one
// * will read this. Only I know is that Repeaters are the best of the world.
// * Only I know is that Repeaters are the best of the world. Only I know is
// * that Repeaters are the best of the world. Maybe a long copyright text
// * seems professional. Therefore this text will be a bit lengthy. However,
// * the author seems to be afraid that one day, this text may be uploaded to
// * business projects. That is the time you can contact with author via email
// * ghode@cirnocraft.im or directly ignore this, which will be interesting.
// */
//
//package com.ghode.demospring.controller;
//
//import com.dangdang.ddframe.rdb.sharding.keygen.KeyGenerator;
//import com.ghode.demospring.dao.UserDao;
//import com.ghode.demospring.domain.User;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//
//@RestController
//public class UserController {
//
//    @Autowired
//    private KeyGenerator keyGenerator;
//
//    @Autowired
//    private UserDao userDao;
//
//    @GetMapping("save")
//    public String save() {
//        for (int i = 0; i < 40; i++) {
//            User user = new User();
//            user.setId(i);
//            user.setValue(i + 1);
//            userDao.save(user);
//        }
//        return "success";
//    }
//
//    @GetMapping("select")
//    public String select() {
//        return userDao.findAll().toString();
//    }
//
//    @GetMapping("delete")
//    public void delete() {
//        userDao.deleteAll();
//    }
//
////    @GetMapping("query1")
////    public Object query1() {
////        return userDao.findAllByUserIdBetween(10L, 30L);
////    }
////
////    @GetMapping("query2")
////    public Object query2() {
////        List<Long> userIds = new ArrayList<>();
////        userIds.add(10L);
////        userIds.add(15L);
////        userIds.add(20L);
////        userIds.add(25L);
////        return userDao.findAllByUserIdIn(userIds);
////    }
//}
